package com.hyt.it.ogt.kq.service.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hyt.core.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 任务考生所属区域表
 * </p>
 *
 * @author huangyh
 * @since 2021-07-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("kw_task_candidate_area")
@ApiModel(value="KwTaskCandidateArea对象", description="任务考生所属区域表")
public class TaskCandidateArea extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "考试任务id")
    private String taskId;

    @ApiModelProperty(value = "区域id")
    private String areaId;

    @ApiModelProperty(value = "父级id")
    private String parentId;

    @ApiModelProperty(value = "所有父级id，逗号分隔")
    private String parentIds;

    @ApiModelProperty(value = "地区名")
    private String name;

    @ApiModelProperty(value = "级别,1:国家，2：省份，3：市，4：县区")
    private String type;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "全称")
    @TableField(value = "full_name")
    private String fullName;

    public static String getTaskCandidateAreaCacheKey(String taskId, String areaId ) {
    	StringBuilder sb = new StringBuilder();
    	sb.append("KW_GOV_CA");
    	sb.append(":");
    	sb.append(taskId);
    	sb.append(":");
    	sb.append(areaId);
		return sb.toString();
    }

}
